﻿
    <form action="/Registry" method="get">
        Key: 
        <select name="hive">
            <option value="80000000">HKEY_CLASSES_ROOT</option>
            <option value="80000001">HKEY_CURRENT_USER</option>
            <option value="80000002">HKEY_LOCAL_MACHINE</option>
            <option value="80000003">HKEY_USERS</option>
            <option value="80000004">HKEY_PERFORMANCE_DATA</option>
            <option value="80000005">HKEY_CURRENT_CONFIG</option>
        </select>
        <input type="text" name="path" placeholder="Path within the registry hive" size="80" onfocus="checkPath()" /><br />
        <input type="submit" name="openKey" value="View Key in browser" />
        <input type="submit" name="download" value="Download this key and subkeys as .REG" />
    </form>
    <script type="text/javascript">
        var params = {};
        window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,
            function (str, key, value) {
                params[key] = value;
            }
        );
        var thehive = document.forms[0].hive;
        for (var i = 0; i < thehive.length; i++) {
            if (thehive[i].value == params["hive"]) {
                thehive[i].selected = true;
                break;
            }
        }
        if (params["path"]) {
            document.forms[0].path.value = decodeURIComponent(params["path"].replace("+", " "));
        }
    </script>
    <br />
{CONTENT}